package com.cn.serverline.lineicp.productionLine.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 工序异常枚举
 *
 * @author Gmr
 * @since 2024/7/30
 */
@Getter
public enum ProductionProcessesException implements AbstractExceptionEnum {

	SPARE_PARTS_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "01", "零组件不存在"),
	PRODUCTION_PROCESSES_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "02", "工序不存在"),
	PRODUCTION_PROCESSES_ID_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "03", "ID不能为空"),
	Worker_Technical_Level_Not_Exist(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "04", "此工人技术等级不存在"),
	PRODUCTION_PROCESSES_CODE_DUPLICATE(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "05", "工序代号不能重复");

	/**
	 * 错误编码
	 */
	private final String errorCode;

	/**
	 * 提示用户信息
	 */
	private final String userTip;

	ProductionProcessesException(String errorCode, String userTip) {
		this.errorCode = errorCode;
		this.userTip = userTip;
	}
}
